<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>订单列表</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
    <style type="text/css">
        * {
            font-size: 11pt;
        }

        div {
            border: solid 2px gray;
            width: 75px;
            height: 75px;
            text-align: center;
        }

        li {
            margin: 10px;
        }

        #buy {
            background: url(<c:url value='/images/all.png'/>) no-repeat;
            display: inline-block;

            background-position: 0 -902px;
            margin-left: 30px;
            height: 36px;
            width: 146px;
        }

        #buy:HOVER {
            background: url(<c:url value='/images/all.png'/>) no-repeat;
            display: inline-block;

            background-position: 0 -938px;
            margin-left: 30px;
            height: 36px;
            width: 146px;
        }
    </style>
</head>

<body>
<h1>我的订单</h1>

<table border="1" width="100%" cellspacing="0" background="black">

    <%--req.getSession().setAttribute("orderList",orderList);--%>
    <%--req.getSession().setAttribute("transitList",transitList);--%>

    <c:forEach var="per" items="${adminOrderList}">

        <tr bgcolor="gray" bordercolor="gray">
            <td colspan="6">
                订单编号：${per.oid}　成交时间：${per.ordertime}　</b></font>
                金额：<font color="red"><b>${per.total}　

                <%--<a href="<c:url value='/osc?oid=${per.oid}&para=pay'/>">付款</a>--%>

                <%--<a href="/osc?oid=${per.oid}&para=delivery">确认收货</a>--%>
                <c:if test="${per.state == 0}">
                未付款
                </c:if>
                <c:if test="${per.state == 1}">
                已付款
                <a href="/adminoss?oid=${per.oid}&para=send">发货</a>
                </c:if>
                <c:if test="${per.state == 2}">
                未收货
                </c:if>
                <c:if test="${per.state == 3}">
                已完成
                </c:if>

            </td>
        </tr>

        <c:forEach var="perr" items="${adminOrderItemList}">
            <c:if test="${per.oid == perr.oid}" var="re">

                <tr bordercolor="gray" align="center">
                    <td width="15%">
                        <div>
                            <img style="width: 75px; height: 75px" src="<c:url value='${perr.image}'/>"/>
                        </div>
                    </td>
                    <td>书名：${perr.bname}</td>
                    <td>作者：${perr.author}</td>
                    <td>单价：${perr.price}元</td>
                    <td>数量：${perr.count}</td>
                    <td>小计：${perr.price * perr.count}元</td>
                </tr>
            </c:if>
        </c:forEach>

    </c:forEach>

</table>

</body>
</html>
